World Health Organization

Context

Although there have been lot of studies undertaken in the past on factors affecting life expectancy considering demographic variables, income composition and mortality rates. It was found that affect of immunization and human development index was not taken into account in the past. Also, some of the past research was done considering multiple linear regression based on data set of one year for all the countries. Hence, this gives motivation to resolve both the factors stated previously by formulating a regression model based on mixed effects model and multiple linear regression while considering data from a period of 2000 to 2015 for all the countries. Important immunization like Hepatitis B, Polio and Diphtheria will also be considered. In a nutshell, this study will focus on immunization factors, mortality factors, economic factors, social factors and other health related factors as well. Since the observations this dataset are based on different countries, it will be easier for a country to determine the predicting factor which is contributing to lower value of life expectancy. This will help in suggesting a country which area should be given importance in order to efficiently improve the life expectancy of its population.

Column Names: Meanings

  • Year: Year
  • Status: Developed or Developing status
  • Life expectancy: Life Expectancy in age
  • Adult Mortality: Adult Mortality Rates of both sexes (probability of dying between 15 and 60 years per 1000 population)
  • infant deaths: Number of Infant Deaths per 1000 population
  • Alcohol: Alcohol, recorded per capita (15+) consumption (in litres of pure alcohol)
  • percentage expenditure: Expenditure on health as a percentage of Gross Domestic Product per capita(%)
  • Hepatitis B: Hepatitis B (HepB) immunization coverage among 1-year-olds (%)
  • Measles:Measles - number of reported cases per 1000 population
  • BMI: Average Body Mass Index of entire population
  • Polio: Polio (Pol3) immunization coverage among 1-year-olds (%)
  • Total expenditure: General government expenditure on health as a percentage of total government expenditure (%)
  • Diphtheria: Diphtheria tetanus toxoid and pertussis (DTP3) immunization coverage among 1-year-olds (%)
  • HIV/AIDS: Deaths per 1 000 live births HIV/AIDS (0-4 years)
  • GDP: Gross Domestic Product per capita (in USD)
  • Population: Population of the country
  • thinness 1-19 years: Prevalence of thinness among children and adolescents for Age 10 to 19 (%)
  • thinness 5-9 years: Prevalence of thinness among children for Age 5 to 9(%)
  • income composition of resources: Human Development Index in terms of income composition of resources (index ranging from 0 to 1)
  • schooling: Number of years of Schooling(years)

1. Does various predicting factors which has been chosen initially really affect the Life expectancy? What are the predicting variables actually affecting the life expectancy?

After running multiple regression models (forward, backward, and stepwise), it was determined that the following variables are the predictors that are statically significant in regards to life expectancy.

Variables - Adult.Mortality
- infant deaths - Total.expenditure - HIV.AIDS - Income.composition.of.resources

While the other variables intuitively may appear significant, the variables above are the predictors that have significant impact according to the regression models. interestingly enough, all models resulted in the same variables being returned.

## 
## Call:
## lm(formula = Life.expectancy ~ Adult.Mortality + infant.deaths + 
##     under.five.deaths + Total.expenditure + HIV.AIDS + Income.composition.of.resources, 
##     data = df1_complete)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -10.568  -1.569  -0.127   1.561  10.060 
## 
## Coefficients:
##                                  Estimate Std. Error t value Pr(>|t|)    
## (Intercept)                     47.860575   2.066580  23.159  < 2e-16 ***
## Adult.Mortality                 -0.017405   0.003866  -4.502 1.53e-05 ***
## infant.deaths                    0.042287   0.029527   1.432 0.154625    
## under.five.deaths               -0.033561   0.022614  -1.484 0.140331    
## Total.expenditure                0.349095   0.111930   3.119 0.002258 ** 
## HIV.AIDS                        -0.809261   0.231621  -3.494 0.000661 ***
## Income.composition.of.resources 35.911609   2.502726  14.349  < 2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 3.096 on 124 degrees of freedom
## Multiple R-squared:  0.8765, Adjusted R-squared:  0.8705 
## F-statistic: 146.7 on 6 and 124 DF,  p-value: < 2.2e-16
## 
## Call:
## lm(formula = Life.expectancy ~ Adult.Mortality + infant.deaths + 
##     Alcohol + percentage.expenditure + Hepatitis.B + Measles + 
##     BMI + under.five.deaths + Polio + Total.expenditure + Diphtheria + 
##     HIV.AIDS + GDP + Population + thinness..1.19.years + thinness.5.9.years + 
##     Income.composition.of.resources + Schooling + Status_dc, 
##     data = df1_complete)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -10.4098  -1.7264  -0.0392   1.7715   8.3880 
## 
## Coefficients:
##                                   Estimate Std. Error t value Pr(>|t|)    
## (Intercept)                      5.122e+01  3.314e+00  15.457  < 2e-16 ***
## Adult.Mortality                 -1.724e-02  4.148e-03  -4.157 6.36e-05 ***
## infant.deaths                    8.287e-02  5.619e-02   1.475 0.143057    
## Alcohol                          5.674e-03  9.749e-02   0.058 0.953689    
## percentage.expenditure           4.627e-04  4.639e-04   0.997 0.320716    
## Hepatitis.B                      1.205e-02  2.808e-02   0.429 0.668582    
## Measles                         -3.361e-05  4.823e-05  -0.697 0.487345    
## BMI                             -7.576e-03  2.000e-02  -0.379 0.705531    
## under.five.deaths               -6.014e-02  3.838e-02  -1.567 0.119989    
## Polio                           -8.746e-03  2.117e-02  -0.413 0.680327    
## Total.expenditure                2.878e-01  1.274e-01   2.259 0.025833 *  
## Diphtheria                       7.644e-03  3.445e-02   0.222 0.824805    
## HIV.AIDS                        -8.363e-01  2.470e-01  -3.385 0.000984 ***
## GDP                             -5.980e-05  6.656e-05  -0.898 0.370911    
## Population                      -1.729e-09  6.804e-09  -0.254 0.799816    
## thinness..1.19.years            -1.300e-01  2.267e-01  -0.574 0.567462    
## thinness.5.9.years               5.458e-03  2.227e-01   0.025 0.980489    
## Income.composition.of.resources  3.597e+01  6.228e+00   5.775 7.11e-08 ***
## Schooling                       -1.617e-01  2.740e-01  -0.590 0.556279    
## Status_dc                       -1.170e+00  1.035e+00  -1.130 0.261006    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 3.186 on 111 degrees of freedom
## Multiple R-squared:  0.8829, Adjusted R-squared:  0.8629 
## F-statistic: 44.06 on 19 and 111 DF,  p-value: < 2.2e-16
## 
## Call:
## lm(formula = Life.expectancy ~ Adult.Mortality + infant.deaths + 
##     under.five.deaths + Total.expenditure + HIV.AIDS + Income.composition.of.resources, 
##     data = df1_complete)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -10.568  -1.569  -0.127   1.561  10.060 
## 
## Coefficients:
##                                  Estimate Std. Error t value Pr(>|t|)    
## (Intercept)                     47.860575   2.066580  23.159  < 2e-16 ***
## Adult.Mortality                 -0.017405   0.003866  -4.502 1.53e-05 ***
## infant.deaths                    0.042287   0.029527   1.432 0.154625    
## under.five.deaths               -0.033561   0.022614  -1.484 0.140331    
## Total.expenditure                0.349095   0.111930   3.119 0.002258 ** 
## HIV.AIDS                        -0.809261   0.231621  -3.494 0.000661 ***
## Income.composition.of.resources 35.911609   2.502726  14.349  < 2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 3.096 on 124 degrees of freedom
## Multiple R-squared:  0.8765, Adjusted R-squared:  0.8705 
## F-statistic: 146.7 on 6 and 124 DF,  p-value: < 2.2e-16

2.Should a country having a lower life expectancy value(<65) increase its healthcare expenditure in order to improve its average lifespan?

3.How does Infant and Adult mortality rates affect life expectancy?

4.Does Life Expectancy has positive or negative correlation with eating habits, lifestyle, exercise, smoking, drinking alcohol etc.

5.What is the impact of schooling on the lifespan of humans?

Life expectancy and schooling have a positive linear relationship. Despite not being significant in the full model, schooling is a significant indicator when its modeled as a singly linear regression.

The summary statistics shows high significants of alpha less than 0.001. The relationship can be modeled by the regression below:

                      life expectancy = 38.72 + 2.51(schooling)

We notice that as schooling increases by a year, life expectancy is increased by 2.5 years, with no schooling having a life expectancy of 38.72 years.

## 
## Call:
## lm(formula = Life.expectancy ~ Schooling, data = df1_complete)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -15.6180  -3.2318   0.5415   3.3678   9.3898 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  38.7198     2.1350   18.14   <2e-16 ***
## Schooling     2.5086     0.1646   15.24   <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 5.162 on 129 degrees of freedom
## Multiple R-squared:  0.6429, Adjusted R-squared:  0.6401 
## F-statistic: 232.2 on 1 and 129 DF,  p-value: < 2.2e-16

6.Does Life Expectancy have positive or negative relationship with drinking alcohol?

Life expectancy has a slight positive increase with alcohol consumption.

                      life expectancy = 67.11 + 1.11(Alcohol)

Notice that as alcohol consumption incrases, life expectancy incrases by 1.11 years, starting at 67.11 years expected if no alcohol is consumed.

This is a bit counter intuitive considering the knowledge that alcohol is not considered to be healthy and many studies suggest that alcohol could shorten life spans. Keeping this in coonsideration, additional studies may need to be conducted.

## 
## Call:
## lm(formula = Life.expectancy ~ Alcohol, data = df1_complete)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -24.6896  -4.4306   0.8788   5.4897  15.8788 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  67.1100     0.8008   83.81  < 2e-16 ***
## Alcohol       1.1140     0.1571    7.09 7.89e-11 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 7.328 on 129 degrees of freedom
## Multiple R-squared:  0.2804, Adjusted R-squared:  0.2748 
## F-statistic: 50.26 on 1 and 129 DF,  p-value: 7.887e-11

7.Do densely populated countries tend to have lower life expectancy?

Initally, there is a significant outlier that skews the data dramatically. Once removed, we noticed the sloped droped by nearly 50%. Considering that there is the possibility of having significanlt high populations, it has been concluded to keep the data point in.

                      life expectancy = 70.58 - 2.65(Population)

Notice that as the population in a country increases, life expectancy decreases by 2.65 years, starting at 70.58 years expected if there is no population. In this scenario, the intercept independent of the slope has no logical reasoning considering that no population would result in no life expectancy.

## 
## Call:
## lm(formula = Life.expectancy ~ Population, data = df1_complete)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -22.477  -5.797   1.446   5.222  18.421 
## 
## Coefficients:
##               Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  7.058e+01  7.680e-01  91.903   <2e-16 ***
## Population  -2.654e-09  6.488e-09  -0.409    0.683    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 8.633 on 129 degrees of freedom
## Multiple R-squared:  0.001295,   Adjusted R-squared:  -0.006447 
## F-statistic: 0.1673 on 1 and 129 DF,  p-value: 0.6832

## 
## Call:
## lm(formula = Life.expectancy ~ Population, data = newdata)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -22.561  -5.546   1.635   5.137  18.332 
## 
## Coefficients:
##               Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  7.067e+01  8.125e-01  86.978   <2e-16 ***
## Population  -1.042e-08  2.306e-08  -0.452    0.652    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 8.662 on 128 degrees of freedom
## Multiple R-squared:  0.001592,   Adjusted R-squared:  -0.006208 
## F-statistic: 0.204 on 1 and 128 DF,  p-value: 0.6522

8.What is the impact of Immunization coverage on life Expectancy?

Reviewing the graphs, there does not appear to be a significant relationship between life expectancy and immunization.

!!!!!!!!!!! Additional EDA!!!!!!!!!!!!!!!!

## 
## Call:
## lm(formula = Life.expectancy ~ ., data = df_immunizations)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -22.1505  -5.2695   0.7869   5.0334  19.8007 
## 
## Coefficients:
##               Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  5.647e+01  3.028e+00  18.648   <2e-16 ***
## Hepatitis.B -9.120e-02  6.498e-02  -1.404   0.1629    
## Measles     -2.967e-05  7.101e-05  -0.418   0.6767    
## Polio        1.172e-01  4.912e-02   2.385   0.0186 *  
## Diphtheria   1.405e-01  7.928e-02   1.772   0.0789 .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 7.962 on 126 degrees of freedom
## Multiple R-squared:  0.1702, Adjusted R-squared:  0.1438 
## F-statistic:  6.46 on 4 and 126 DF,  p-value: 9.221e-05

Objective 1

Display the ability to build regression models using the skills and discussions from Unit 1 and 2 with the purpose of identifying key relationships, interpreting those relationships, and making good predictions.

Reminder, key here is to tell a good story.

Build Model 1

  • Identify key relationships
  • Ensure interpretability

Unit 2 Objectives: - bias vs. variance - complexity - LASSO, LARS, CV (cross validation)

  1. Perform regression analysis

  2. Report predictive ability
    1. Test/train set
    2. CV data
  3. Hypothesis Testing

  4. Interpret the coefficients

  5. Confidence intervals

  6. Practical and statistical significance

Model 2

- Product the best predictions as possible
- Interpretation is no longer required, hence complexity is no longer an issue
  1. Feature selection to avoid overfitting

  2. Create the model

  3. Compare model 1 vs. model 2

  4. Comment on the differences of the models and whether model 2 brings any benefit

Objective 2

- Nonparametric technique
- kNN or regression trees (select one)

Set of predictors from previous regression: (fill this out)

  1. Model

  2. A brief description of your nonparametric model’s strategy to make a prediction. Include Pros and Cons.

  3. Provide any additional details that you feel might be necessary to report.

  4. Report the test ASE using this nonparametric model so we can see how well it does compared to regression.

EDA

Suchi’s EDA

## Jamie’s EDA

Linear correlations: - Schooling vs Income.composition.of.resource - thinness..1.19.years vs thinness.5.9.years - life exp. vs schooling - life exp. vs income - infant death vs under 5 death

removed variables that were correlated

##                 Country         Year             Status    Life.expectancy
##  Afghanistan        :  1   Min.   :2014   Developed : 32   Min.   :48.10  
##  Albania            :  1   1st Qu.:2014   Developing:151   1st Qu.:65.60  
##  Algeria            :  1   Median :2014                    Median :73.60  
##  Angola             :  1   Mean   :2014                    Mean   :71.54  
##  Antigua and Barbuda:  1   3rd Qu.:2014                    3rd Qu.:76.85  
##  Argentina          :  1   Max.   :2014                    Max.   :89.00  
##  (Other)            :177                                                  
##  Adult.Mortality infant.deaths       Alcohol       percentage.expenditure
##  Min.   :  1.0   Min.   :  0.00   Min.   : 0.010   Min.   :    0.00      
##  1st Qu.: 66.0   1st Qu.:  0.00   1st Qu.: 0.010   1st Qu.:   11.06      
##  Median :135.0   Median :  2.00   Median : 0.320   Median :  151.10      
##  Mean   :148.7   Mean   : 24.56   Mean   : 3.271   Mean   : 1001.91      
##  3rd Qu.:216.5   3rd Qu.: 18.00   3rd Qu.: 6.700   3rd Qu.:  703.21      
##  Max.   :522.0   Max.   :957.00   Max.   :15.190   Max.   :19479.91      
##                                   NA's   :1                              
##   Hepatitis.B       Measles           BMI        under.five.deaths
##  Min.   : 2.00   Min.   :    0   Min.   : 2.00   Min.   :   0.00  
##  1st Qu.:79.00   1st Qu.:    0   1st Qu.:23.20   1st Qu.:   0.00  
##  Median :93.00   Median :   13   Median :47.40   Median :   3.00  
##  Mean   :83.12   Mean   : 1831   Mean   :41.03   Mean   :  32.89  
##  3rd Qu.:97.00   3rd Qu.:  316   3rd Qu.:59.80   3rd Qu.:  22.00  
##  Max.   :99.00   Max.   :79563   Max.   :77.10   Max.   :1200.00  
##  NA's   :10                      NA's   :2                        
##      Polio       Total.expenditure   Diphtheria       HIV.AIDS    
##  Min.   : 8.00   Min.   : 1.210    Min.   : 2.00   Min.   :0.100  
##  1st Qu.:80.00   1st Qu.: 4.480    1st Qu.:83.00   1st Qu.:0.100  
##  Median :94.00   Median : 5.840    Median :94.00   Median :0.100  
##  Mean   :84.73   Mean   : 6.201    Mean   :84.08   Mean   :0.682  
##  3rd Qu.:97.00   3rd Qu.: 7.740    3rd Qu.:97.00   3rd Qu.:0.400  
##  Max.   :99.00   Max.   :17.140    Max.   :99.00   Max.   :9.400  
##                  NA's   :2                                        
##       GDP              Population        thinness..1.19.years
##  Min.   :    12.28   Min.   :4.100e+01   Min.   : 0.100      
##  1st Qu.:   617.99   1st Qu.:2.869e+05   1st Qu.: 1.500      
##  Median :  3154.51   Median :1.568e+06   Median : 3.300      
##  Mean   : 10015.57   Mean   :2.106e+07   Mean   : 4.533      
##  3rd Qu.:  8239.95   3rd Qu.:8.080e+06   3rd Qu.: 6.600      
##  Max.   :119172.74   Max.   :1.294e+09   Max.   :26.800      
##  NA's   :28          NA's   :41          NA's   :2           
##  thinness.5.9.years Income.composition.of.resources   Schooling    
##  Min.   : 0.100     Min.   :0.3450                  Min.   : 4.90  
##  1st Qu.: 1.500     1st Qu.:0.5700                  1st Qu.:10.80  
##  Median : 3.400     Median :0.7220                  Median :13.00  
##  Mean   : 4.676     Mean   :0.6884                  Mean   :12.89  
##  3rd Qu.: 6.600     3rd Qu.:0.7960                  3rd Qu.:14.90  
##  Max.   :27.400     Max.   :0.9450                  Max.   :20.40  
##  NA's   :2          NA's   :10                      NA's   :10     
##  Life.expectancy.1    Status_dc     
##  Length:183         Min.   :0.0000  
##  Class :character   1st Qu.:1.0000  
##  Mode  :character   Median :1.0000  
##                     Mean   :0.8251  
##                     3rd Qu.:1.0000  
##                     Max.   :1.0000  
## 
##  [1] "Country"                         "Year"                           
##  [3] "Status"                          "Life.expectancy"                
##  [5] "Adult.Mortality"                 "infant.deaths"                  
##  [7] "Alcohol"                         "percentage.expenditure"         
##  [9] "Hepatitis.B"                     "Measles"                        
## [11] "BMI"                             "under.five.deaths"              
## [13] "Polio"                           "Total.expenditure"              
## [15] "Diphtheria"                      "HIV.AIDS"                       
## [17] "GDP"                             "Population"                     
## [19] "thinness..1.19.years"            "thinness.5.9.years"             
## [21] "Income.composition.of.resources" "Schooling"                      
## [23] "Life.expectancy.1"               "Status_dc"

#### Regression Testing/Variables Reduction

Forward, backward, and stepwise regressions were run and all 3 resulted with the same 4 significant variables.

Variables - Adult.Mortality
- infant deaths - Total.expenditure - HIV.AIDS - Income.composition.of.resources

## 
## Call:
## lm(formula = Life.expectancy ~ Adult.Mortality + Total.expenditure + 
##     HIV.AIDS + Income.composition.of.resources + Life.expectancy.1, 
##     data = df1_complete)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -9.7539 -1.5929  0.0074  1.6631 10.6939 
## 
## Coefficients:
##                                 Estimate Std. Error t value Pr(>|t|)    
## (Intercept)                     50.76505    2.32027  21.879  < 2e-16 ***
## Adult.Mortality                 -0.01700    0.00378  -4.496 1.56e-05 ***
## Total.expenditure                0.39230    0.10971   3.576 0.000497 ***
## HIV.AIDS                        -0.55729    0.24900  -2.238 0.026985 *  
## Income.composition.of.resources 31.75821    2.96054  10.727  < 2e-16 ***
## Life.expectancy.1Low            -2.90429    1.08518  -2.676 0.008441 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 3.029 on 125 degrees of freedom
## Multiple R-squared:  0.8809, Adjusted R-squared:  0.8761 
## F-statistic: 184.9 on 5 and 125 DF,  p-value: < 2.2e-16
## 
## Call:
## lm(formula = Life.expectancy ~ Adult.Mortality + infant.deaths + 
##     Alcohol + percentage.expenditure + Hepatitis.B + Measles + 
##     BMI + under.five.deaths + Polio + Total.expenditure + Diphtheria + 
##     HIV.AIDS + GDP + Population + thinness..1.19.years + thinness.5.9.years + 
##     Income.composition.of.resources + Schooling + Life.expectancy.1, 
##     data = df1_complete)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -9.6206 -1.7993  0.1196  1.4778  9.0945 
## 
## Coefficients:
##                                   Estimate Std. Error t value Pr(>|t|)    
## (Intercept)                      5.416e+01  3.441e+00  15.739  < 2e-16 ***
## Adult.Mortality                 -1.707e-02  4.062e-03  -4.201 5.39e-05 ***
## infant.deaths                    5.084e-02  5.664e-02   0.897 0.371396    
## Alcohol                          5.116e-02  9.458e-02   0.541 0.589625    
## percentage.expenditure           3.714e-04  4.545e-04   0.817 0.415602    
## Hepatitis.B                     -8.781e-03  2.818e-02  -0.312 0.755941    
## Measles                         -2.284e-05  4.748e-05  -0.481 0.631396    
## BMI                             -7.922e-03  1.954e-02  -0.406 0.685872    
## under.five.deaths               -3.548e-02  3.892e-02  -0.912 0.363915    
## Polio                           -7.978e-03  2.073e-02  -0.385 0.701115    
## Total.expenditure                3.129e-01  1.243e-01   2.518 0.013221 *  
## Diphtheria                       2.522e-02  3.397e-02   0.742 0.459403    
## HIV.AIDS                        -5.789e-01  2.628e-01  -2.202 0.029702 *  
## GDP                             -2.934e-05  6.516e-05  -0.450 0.653446    
## Population                      -2.321e-09  6.646e-09  -0.349 0.727600    
## thinness..1.19.years             1.896e-02  2.296e-01   0.083 0.934327    
## thinness.5.9.years              -1.528e-01  2.261e-01  -0.676 0.500610    
## Income.composition.of.resources  2.717e+01  7.106e+00   3.824 0.000217 ***
## Schooling                        2.068e-02  2.732e-01   0.076 0.939815    
## Life.expectancy.1Low            -3.215e+00  1.303e+00  -2.468 0.015113 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 3.12 on 111 degrees of freedom
## Multiple R-squared:  0.8877, Adjusted R-squared:  0.8685 
## F-statistic:  46.2 on 19 and 111 DF,  p-value: < 2.2e-16
## 
## Call:
## lm(formula = Life.expectancy ~ Adult.Mortality + Total.expenditure + 
##     HIV.AIDS + Income.composition.of.resources + Life.expectancy.1, 
##     data = df1_complete)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -9.7539 -1.5929  0.0074  1.6631 10.6939 
## 
## Coefficients:
##                                 Estimate Std. Error t value Pr(>|t|)    
## (Intercept)                     50.76505    2.32027  21.879  < 2e-16 ***
## Adult.Mortality                 -0.01700    0.00378  -4.496 1.56e-05 ***
## Total.expenditure                0.39230    0.10971   3.576 0.000497 ***
## HIV.AIDS                        -0.55729    0.24900  -2.238 0.026985 *  
## Income.composition.of.resources 31.75821    2.96054  10.727  < 2e-16 ***
## Life.expectancy.1Low            -2.90429    1.08518  -2.676 0.008441 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 3.029 on 125 degrees of freedom
## Multiple R-squared:  0.8809, Adjusted R-squared:  0.8761 
## F-statistic: 184.9 on 5 and 125 DF,  p-value: < 2.2e-16

5.What is the impact of schooling on the lifespan of humans?

## 
## Call:
## lm(formula = Life.expectancy ~ Schooling, data = df1_complete)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -15.6180  -3.2318   0.5415   3.3678   9.3898 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  38.7198     2.1350   18.14   <2e-16 ***
## Schooling     2.5086     0.1646   15.24   <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 5.162 on 129 degrees of freedom
## Multiple R-squared:  0.6429, Adjusted R-squared:  0.6401 
## F-statistic: 232.2 on 1 and 129 DF,  p-value: < 2.2e-16

6.Does Life Expectancy have positive or negative relationship with drinking alcohol?

Life expectancy has a slight positive increase with alcohol consumption.

## 
## Call:
## lm(formula = Life.expectancy ~ Alcohol, data = df1_complete)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -24.6896  -4.4306   0.8788   5.4897  15.8788 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  67.1100     0.8008   83.81  < 2e-16 ***
## Alcohol       1.1140     0.1571    7.09 7.89e-11 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 7.328 on 129 degrees of freedom
## Multiple R-squared:  0.2804, Adjusted R-squared:  0.2748 
## F-statistic: 50.26 on 1 and 129 DF,  p-value: 7.887e-11

7.Do densely populated countries tend to have lower life expectancy?

## 
## Call:
## lm(formula = Life.expectancy ~ Population, data = df1_complete)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -22.477  -5.797   1.446   5.222  18.421 
## 
## Coefficients:
##               Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  7.058e+01  7.680e-01  91.903   <2e-16 ***
## Population  -2.654e-09  6.488e-09  -0.409    0.683    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 8.633 on 129 degrees of freedom
## Multiple R-squared:  0.001295,   Adjusted R-squared:  -0.006447 
## F-statistic: 0.1673 on 1 and 129 DF,  p-value: 0.6832

## 
## Call:
## lm(formula = Life.expectancy ~ Population, data = newdata)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -22.561  -5.546   1.635   5.137  18.332 
## 
## Coefficients:
##               Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  7.067e+01  8.125e-01  86.978   <2e-16 ***
## Population  -1.042e-08  2.306e-08  -0.452    0.652    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 8.662 on 128 degrees of freedom
## Multiple R-squared:  0.001592,   Adjusted R-squared:  -0.006208 
## F-statistic: 0.204 on 1 and 128 DF,  p-value: 0.6522

8.What is the impact of Immunization coverage on life Expectancy?

Reviewing the graphs, there does not appear to be a significant relationship between life expectancy and immunization.

!!! Testing !!! - interaction terms - awknowledge polio significance

## 
## Call:
## lm(formula = log.Life.expectancy ~ log.Hepatitis.B, data = df_immunizations)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.37943 -0.07283  0.02674  0.07583  0.23398 
## 
## Coefficients:
##                 Estimate Std. Error t value Pr(>|t|)    
## (Intercept)      4.10595    0.07087  57.939   <2e-16 ***
## log.Hepatitis.B  0.03321    0.01635   2.031   0.0443 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.1242 on 129 degrees of freedom
## Multiple R-squared:  0.031,  Adjusted R-squared:  0.02349 
## F-statistic: 4.127 on 1 and 129 DF,  p-value: 0.04426